package com.fable.dal.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ActReferQuery {
    /**
     * order by clause.
     */
    protected String orderByClause;

    /**
     * distinct
     */
    protected boolean distinct;

    /**
     * criteria list
     */
    protected List<Criteria> oredCriteria;

    /**
     * page
     */
    protected Integer pageOffset;

    /**
     * page size
     */
    protected Integer pageSize;

    public ActReferQuery() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public boolean isValid() {
        for (int i = 0; i < oredCriteria.size(); i++) {
            if (oredCriteria.get(i).isValid()) {
                return true;
            }
        }
        return false;
    }

    public void setPageOffset(Integer pageOffset) {
        this.pageOffset = pageOffset;
    }

    public Integer getPageOffset() {
        return pageOffset;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }
        /**

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }


                public Criteria andGmtCreateIsNull() {
                    addCriterion("gmt_create is null");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateIsNotNull() {
                    addCriterion("gmt_create is not null");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateEqualTo(Date value) {
                    addCriterion("gmt_create =", value, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateNotEqualTo(Date value) {
                    addCriterion("gmt_create <>", value, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateGreaterThan(Date value) {
                    addCriterion("gmt_create >", value, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) {
                    addCriterion("gmt_create >=", value, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateLessThan(Date value) {
                    addCriterion("gmt_create <", value, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateLessThanOrEqualTo(Date value) {
                    addCriterion("gmt_create <=", value, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateIn(List<Date> values) {
                    addCriterion("gmt_create in", values, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateNotIn(List<Date> values) {
                    addCriterion("gmt_create not in", values, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateBetween(Date value1, Date value2) {
                    addCriterion("gmt_create between", value1, value2, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtCreateNotBetween(Date value1, Date value2) {
                    addCriterion("gmt_create not between", value1, value2, "gmtCreate");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedIsNull() {
                    addCriterion("gmt_modified is null");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedIsNotNull() {
                    addCriterion("gmt_modified is not null");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedEqualTo(Date value) {
                    addCriterion("gmt_modified =", value, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedNotEqualTo(Date value) {
                    addCriterion("gmt_modified <>", value, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedGreaterThan(Date value) {
                    addCriterion("gmt_modified >", value, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedGreaterThanOrEqualTo(Date value) {
                    addCriterion("gmt_modified >=", value, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedLessThan(Date value) {
                    addCriterion("gmt_modified <", value, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedLessThanOrEqualTo(Date value) {
                    addCriterion("gmt_modified <=", value, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedIn(List<Date> values) {
                    addCriterion("gmt_modified in", values, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedNotIn(List<Date> values) {
                    addCriterion("gmt_modified not in", values, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedBetween(Date value1, Date value2) {
                    addCriterion("gmt_modified between", value1, value2, "gmtModified");
                    return (Criteria) this;
                }

                public Criteria andGmtModifiedNotBetween(Date value1, Date value2) {
                    addCriterion("gmt_modified not between", value1, value2, "gmtModified");
                    return (Criteria) this;
                }
                 **/

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(Long value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(Long value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andTitleIsNull() {
            addCriterion("title is null");
            return (Criteria) this;
        }

        public Criteria andTitleIsNotNull() {
            addCriterion("title is not null");
            return (Criteria) this;
        }

        public Criteria andTitleEqualTo(String value) {
            addCriterion("title =", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotEqualTo(String value) {
            addCriterion("title <>", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThan(String value) {
            addCriterion("title >", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThanOrEqualTo(String value) {
            addCriterion("title >=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThan(String value) {
            addCriterion("title <", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThanOrEqualTo(String value) {
            addCriterion("title <=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLike(String value) {
            addCriterion("title like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotLike(String value) {
            addCriterion("title not like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleIn(List<String> values) {
            addCriterion("title in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotIn(List<String> values) {
            addCriterion("title not in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleBetween(String value1, String value2) {
            addCriterion("title between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotBetween(String value1, String value2) {
            addCriterion("title not between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlIsNull() {
            addCriterion("huodong_url is null");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlIsNotNull() {
            addCriterion("huodong_url is not null");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlEqualTo(String value) {
            addCriterion("huodong_url =", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlNotEqualTo(String value) {
            addCriterion("huodong_url <>", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlGreaterThan(String value) {
            addCriterion("huodong_url >", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlGreaterThanOrEqualTo(String value) {
            addCriterion("huodong_url >=", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlLessThan(String value) {
            addCriterion("huodong_url <", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlLessThanOrEqualTo(String value) {
            addCriterion("huodong_url <=", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlLike(String value) {
            addCriterion("huodong_url like", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlNotLike(String value) {
            addCriterion("huodong_url not like", value, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlIn(List<String> values) {
            addCriterion("huodong_url in", values, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlNotIn(List<String> values) {
            addCriterion("huodong_url not in", values, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlBetween(String value1, String value2) {
            addCriterion("huodong_url between", value1, value2, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andHuodongUrlNotBetween(String value1, String value2) {
            addCriterion("huodong_url not between", value1, value2, "huodongUrl");
            return (Criteria) this;
        }

        public Criteria andPvIsNull() {
            addCriterion("pv is null");
            return (Criteria) this;
        }

        public Criteria andPvIsNotNull() {
            addCriterion("pv is not null");
            return (Criteria) this;
        }

        public Criteria andPvEqualTo(Long value) {
            addCriterion("pv =", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvNotEqualTo(Long value) {
            addCriterion("pv <>", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvGreaterThan(Long value) {
            addCriterion("pv >", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvGreaterThanOrEqualTo(Long value) {
            addCriterion("pv >=", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvLessThan(Long value) {
            addCriterion("pv <", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvLessThanOrEqualTo(Long value) {
            addCriterion("pv <=", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvLike(Long value) {
            addCriterion("pv like", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvNotLike(Long value) {
            addCriterion("pv not like", value, "pv");
            return (Criteria) this;
        }

        public Criteria andPvIn(List<Long> values) {
            addCriterion("pv in", values, "pv");
            return (Criteria) this;
        }

        public Criteria andPvNotIn(List<Long> values) {
            addCriterion("pv not in", values, "pv");
            return (Criteria) this;
        }

        public Criteria andPvBetween(Long value1, Long value2) {
            addCriterion("pv between", value1, value2, "pv");
            return (Criteria) this;
        }

        public Criteria andPvNotBetween(Long value1, Long value2) {
            addCriterion("pv not between", value1, value2, "pv");
            return (Criteria) this;
        }

        public Criteria andReferIsNull() {
            addCriterion("refer is null");
            return (Criteria) this;
        }

        public Criteria andReferIsNotNull() {
            addCriterion("refer is not null");
            return (Criteria) this;
        }

        public Criteria andReferEqualTo(String value) {
            addCriterion("refer =", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferNotEqualTo(String value) {
            addCriterion("refer <>", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferGreaterThan(String value) {
            addCriterion("refer >", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferGreaterThanOrEqualTo(String value) {
            addCriterion("refer >=", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferLessThan(String value) {
            addCriterion("refer <", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferLessThanOrEqualTo(String value) {
            addCriterion("refer <=", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferLike(String value) {
            addCriterion("refer like", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferNotLike(String value) {
            addCriterion("refer not like", value, "refer");
            return (Criteria) this;
        }

        public Criteria andReferIn(List<String> values) {
            addCriterion("refer in", values, "refer");
            return (Criteria) this;
        }

        public Criteria andReferNotIn(List<String> values) {
            addCriterion("refer not in", values, "refer");
            return (Criteria) this;
        }

        public Criteria andReferBetween(String value1, String value2) {
            addCriterion("refer between", value1, value2, "refer");
            return (Criteria) this;
        }

        public Criteria andReferNotBetween(String value1, String value2) {
            addCriterion("refer not between", value1, value2, "refer");
            return (Criteria) this;
        }

        public Criteria andAdIsNull() {
            addCriterion("ad is null");
            return (Criteria) this;
        }

        public Criteria andAdIsNotNull() {
            addCriterion("ad is not null");
            return (Criteria) this;
        }

        public Criteria andAdEqualTo(Integer value) {
            addCriterion("ad =", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdNotEqualTo(Integer value) {
            addCriterion("ad <>", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdGreaterThan(Integer value) {
            addCriterion("ad >", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdGreaterThanOrEqualTo(Integer value) {
            addCriterion("ad >=", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdLessThan(Integer value) {
            addCriterion("ad <", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdLessThanOrEqualTo(Integer value) {
            addCriterion("ad <=", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdLike(Integer value) {
            addCriterion("ad like", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdNotLike(Integer value) {
            addCriterion("ad not like", value, "ad");
            return (Criteria) this;
        }

        public Criteria andAdIn(List<Integer> values) {
            addCriterion("ad in", values, "ad");
            return (Criteria) this;
        }

        public Criteria andAdNotIn(List<Integer> values) {
            addCriterion("ad not in", values, "ad");
            return (Criteria) this;
        }

        public Criteria andAdBetween(Integer value1, Integer value2) {
            addCriterion("ad between", value1, value2, "ad");
            return (Criteria) this;
        }

        public Criteria andAdNotBetween(Integer value1, Integer value2) {
            addCriterion("ad not between", value1, value2, "ad");
            return (Criteria) this;
        }

        public Criteria andLogDateIsNull() {
            addCriterion("log_date is null");
            return (Criteria) this;
        }

        public Criteria andLogDateIsNotNull() {
            addCriterion("log_date is not null");
            return (Criteria) this;
        }

        public Criteria andLogDateEqualTo(Date value) {
            addCriterion("log_date =", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateNotEqualTo(Date value) {
            addCriterion("log_date <>", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateGreaterThan(Date value) {
            addCriterion("log_date >", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateGreaterThanOrEqualTo(Date value) {
            addCriterion("log_date >=", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateLessThan(Date value) {
            addCriterion("log_date <", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateLessThanOrEqualTo(Date value) {
            addCriterion("log_date <=", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateLike(Date value) {
            addCriterion("log_date like", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateNotLike(Date value) {
            addCriterion("log_date not like", value, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateIn(List<Date> values) {
            addCriterion("log_date in", values, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateNotIn(List<Date> values) {
            addCriterion("log_date not in", values, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateBetween(Date value1, Date value2) {
            addCriterion("log_date between", value1, value2, "logDate");
            return (Criteria) this;
        }

        public Criteria andLogDateNotBetween(Date value1, Date value2) {
            addCriterion("log_date not between", value1, value2, "logDate");
            return (Criteria) this;
        }

    }

    /**
     * This class corresponds to the database table bi_act_refer
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * This class corresponds to the database table bi_act_refer
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}